﻿using NExt.util;
using NExt.Core.Model.Base;

namespace NExt.tree
{
    public class TreeLoader : TreeLoader<TreeLoaderEvents>
    {
    }

    public abstract class TreeLoader<TEvents>: Observable<TEvents>
        where TEvents : TreeLoaderEvents, new()
    {
        public object baseAttrs { get; set; }
        public object baseParams { get; set; }
        public bool? clearOnLoad { get; set; }
        public string dataUrl { get; set; }
        public bool? preloadChildren { get; set; }
        public string requestMethod { get; set; }
        public object uiProviders { get; set; }
        public string url { get; set; }
    }

    public class TreeLoaderEvents: ObservableEvents
    {
        public IScript beforeload;
        public IScript load;
        public IScript loadexception;
    }
}
